/**
 * \file Ray.cpp
 * \brief Ray declaration class
 * \author Edouard ROGE
 * \date 7 juin 2012
 */

#include "Ray.h"

namespace Math
{
	namespace M3D
	{
		Ray::Ray()
			: m_Origin(0.0f, 0.0f, 0.0f), m_Direction(1.0f, 0.0f, 0.0f)
		{
		}

		Ray::Ray(const Point3f & _origin, const Vector3f & _direction)
			: m_Origin(_origin), m_Direction(_direction)
		{
		}

		Ray::Ray(const Ray & _ray)
			: m_Origin(_ray.m_Origin), m_Direction(_ray.m_Direction)
		{
		}

		Ray::~Ray()
		{
		}

		void Ray::Set(const Point3f & _origin, const Vector3f & _direction)
		{
			m_Origin = _origin;
			m_Direction = _direction;
		}

		void Ray::SetOrigin(const Point3f & _origin)
		{
			m_Origin = _origin;
		}

		void Ray::SetDirection(const Vector3f & _direction)
		{
			m_Direction = _direction;
		}

		const Point3f & Ray::GetOrigin() const
		{
			return m_Origin;
		}

		const Vector3f & Ray::GetDirection() const
		{
			return m_Direction;
		}
	}
}